#pragma once

#include <vector>

#define NODE_DRAW_RADIUS    3

// Type flags
#define NF_INLET    0x0001
#define NF_OUTLET   0x0002
#define NF_INOUT    (NF_INLET | NF_OUTLET)
#define NF_SPAWN    0x0004
#define NF_SELECTED 0x0100

class CNode
{
public:
    CNode();
    CNode(int id);
    ~CNode();

    void Paint(CPaintDC& dc);
    void DrawLineTo(CNode* n, CPaintDC& dc, COLORREF cr);
    
    int m_id;
    CPoint m_pt;

    CNode* m_north;
    CNode* m_south;
    CNode* m_east;
    CNode* m_west;
    unsigned short m_type;

    // Dijkstra's stuff    
	CNode* m_prev;
	int m_dfs;      // Distance From Start
};
typedef std::vector<CNode*> CNodePtrVec;
typedef CNodePtrVec::iterator CNodePtrVecIter;
typedef CNodePtrVec::const_iterator CNodePtrVecCIter;
typedef std::vector<CNodePtrVec> CNodePtr2dVec;
typedef CNodePtr2dVec::iterator CNodePtr2dVecIter;
typedef CNodePtr2dVec::const_iterator CNodePtr2dVecCIter;